package com.swust.exam.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.swust.exam.dao.ExamMapper;
import com.swust.exam.dao.QuestionMapper;
import com.swust.exam.pojo.Exam;
import com.swust.exam.pojo.Question;
@Service
public class QuestionService {
	@Autowired
	private QuestionMapper questionMapper;
	
	public Question get(int id){
		return questionMapper.selectByPrimaryKey(id);
	} 
	
	public int delete(int id) {
		return questionMapper.deleteByPrimaryKey(id);
	}
	
	public int insert(Question question) {
		return questionMapper.insert(question);
	}
	
	public int update(Question question) {
		return questionMapper.updateByPrimaryKey(question);
	}


}
